<?php
declare(strict_types=1);
namespace App\Controller\Api\V1\Cms;

use App\Controller\Api\BaseController;
use App\Model\CmsPost;
use App\Repositories\CmsPostRepository;

class HelpController extends BaseController
{
    public function list()
    {
        $search = [
            'type' => ['field'=>'type','value'=>CmsPost::TYPE_HELP]
        ];
        $orderBy= [
            [
                'field' => 'id',
                'sort' => 'desc'
            ]
        ];
        $datas = CmsPostRepository::getInstance()->getList(['id','title'],$search,[],$orderBy);
        return $this->response->success($datas);
    }
}